import 'package:flutter/material.dart';
import 'package:food_web/Components/default_button.dart';
import 'package:food_web/Screens/Home/Components/menu_item.dart';

class CustomAppbar extends StatefulWidget {
  const CustomAppbar({Key? key}) : super(key: key);

  @override
  _CustomAppbarState createState() => _CustomAppbarState();
}

class _CustomAppbarState extends State<CustomAppbar> {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Row(
        children: [
          Image.asset(
            'assets/images/logo.png',
            height: 15,
            alignment: Alignment.topCenter,
          ),
          SizedBox(
            width: 5,
          ),
          Text(
            "Foodi".toUpperCase(),
            style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
          ),
          Spacer(),
          MyItem(
            title: 'Home',
            press: () {},
          ),
          MyItem(
            title: 'About',
            press: () {},
          ),
          MyItem(
            title: 'Pricing',
            press: () {},
          ),
          MyItem(
            title: 'Contact',
            press: () {},
          ),
          MyItem(
            title: 'Login',
            press: () {},
          ),
          DefaultButton(
            text: "Get Stanred",
            press: () {},
          ),
        ],
      ),
      margin: EdgeInsets.all(20),
      padding: EdgeInsets.all(20),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(46),
        color: Colors.white,
        boxShadow: [
          BoxShadow(
            offset: Offset(0, -2), //x,y轴
            blurRadius: 30, //投影距离
            color: Colors.black.withOpacity(0.16),
          ), //投影颜色
        ],
      ),
    );
  }
}
